package com.example.daliy.sync;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicStampedReference;

public class Student {

    private int num = 0;

    AtomicInteger atomicInteger = new AtomicInteger();
    AtomicStampedReference atomicStampedReference = new AtomicStampedReference(num,num);

    public int getNum(){
        return atomicInteger.get();
    }
    public  void add() {
        atomicInteger.incrementAndGet();
    }
}
